<?php include "header.html"; ?>

<body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">
      <div class="layui-header">
        <div class="layui-logo layui-bg-black">
          有道第三方平台
        </div>
        <!-- 头部区域 -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item" lay-unselect="">
              <a href="javascript:;" onclick="app.navDisplay(this)" title="侧边伸缩">
                <i class="layui-icon layui-icon-shrink-right"></i>
              </a>
            </li>
            <li class="layui-nav-item" lay-unselect="">
                <a href="javascript:app.iframeReload();" title="刷新">
                  <i class="layui-icon layui-icon-refresh-3"></i>
                </a>
            </li>
            <li class="layui-nav-item layui-hide-xs" lay-unselect="">
              <a href="../" target="_blank" title="浏览网站">
                <i class="layui-icon layui-icon-website"></i>
              </a>
            </li>
        </ul>

        <ul class="layui-nav layui-layout-right">
          <li class="layui-nav-item">
            <a href="javascript:;">
              <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
              <?= $_SESSION["admin__name"]; ?> [<?= $language; ?>]
            </a>
            <dl class="layui-nav-child">
              <dd><a href="admin" target="rightFrame">管理员列表</a></dd>
              <dd><a href="group" target="rightFrame">管理组</a></dd>
            </dl>
          </li>
          <li class="layui-nav-item"><a href="login/logout">退出登陆</a></li>
        </ul>
      </div>
      
      <div class="layui-side layui-bg-black layui-side-menu">
        <div class="layui-side-scroll">
          <!-- 左侧导航区域 -->
          <ul class="layui-nav layui-nav-tree">
            <?php 
            
            foreach ($menu as $val) {
            ?>
            <li class="layui-nav-item">
              <a <?php if ($val['url']) { ?> href="<?= $val['url'] ?>"<?php }?> target="rightFrame">
                <i class="layui-icon <?= $val['icon'] ?>"></i>
                <cite><?= $val["name"]; ?></cite>
              </a>

              <?php if ($val["child"]) { ?>
                <dl class="layui-nav-child">
                  <?php
                  
                  foreach ($val["child"] as $child_1) {
                  ?>
                  <dd>
                    <a <?php if ($child_1['url']) { ?> href="<?= $child_1['url'] ?>"<?php }?> target="rightFrame"><?= $child_1["name"] ?></a>
                      <?php if ($child_1["child"]) { ?>
                      <dl class="layui-nav-child">
                        
                          <?php

                          foreach ($child_1["child"] as $child_2) {
                          ?>
                          <dd><a <?php if ($child_2['url']) { ?> href="<?= $child_2['url'] ?>"<?php }?> target="rightFrame"><?= $child_2["name"]; ?></a></dd>
                          <?php } ?>
                      </dl>
                      <?php } ?>
                  </dd>
                  <?php } ?>
                </dl>
              <?php } ?>
            </li>
            <?php } ?>
          </ul>
        </div>
      </div>
      
      <div class="layui-body layui-body-iframe">
        <!-- 内容主体区域 -->
        <iframe src="/manage/console" frameborder='0' name='rightFrame' width='100%' height="100%" scrolling="Yes"></iframe>
      </div>
    </div>
    <script>
      layui.use(['element']);
    </script>
</body>
</html>